#include "riscv_test.h"
#include "test_macros.h"
#include "cordicrocc.h"
#include "riscv_test_rocc.h"

#define CUSTOM_X 0

RVTEST_WITH_ROCC
start:
RVTEST_CODE_BEGIN

1: 
  li a1,0x0
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, SIN)
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, COS)

  li a1,0x1555
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, SIN)
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, COS)

  li a1,0x2AAA
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, SIN)
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, COS)
 
  li a1,0x4000
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, SIN)
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, COS)

  li a1,0x5555
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, SIN)
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, COS)

  li a1,0x6AAA
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, SIN)
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, COS)

  li a1,0x8000
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, SIN)
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, COS)

  li a1,0x9555
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, SIN)
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, COS)

  li a1,0xAAAA
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, SIN)
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, COS)

  li a1,0xC000
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, SIN)
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, COS)
  
  li a1,0xD555
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, SIN)
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, COS)

  li a1,0xEAAA
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, SIN)
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, COS)

  li a1,0xFF49
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, SIN)
  ROCC_INSTRUCTION_RAW_R_R_R(CUSTOM_X,  10, 11, 0, COS)

  RVTEST_CODE_END

.data
RVTEST_DATA_BEGIN
TEST_DATA
data: 
RVTEST_DATA_END

